//加载提示消息
function loadTask(url) {

	$.ajax({
		type : "post",
		url : url,
		dataType : "json",
		success : function(msg) {
			// 去掉 parent 红*
			$("span[class='tasknode']").remove();
			
			// 设置值
			$.each(msg, function() {
				var code = $(this).attr("code");
				var cnt = $(this).attr("cnt");

				var node = zTreeObj.getNodeByParam("code", code, null);
				if(node==null){
					return;
				}
				
				$thisnode = $("#" + node.tId + "_span");
				var html = $thisnode.html();

				var index = html.indexOf("<span style=");
				if (index != -1) {
					html = html.substring(0, index);
				}
				$thisnode.html(html);

				if (cnt == 0) {
					html += "<span class='tasknode' style='color:red'>(" + cnt + ")</span>";
					return;// 开发时可以注释此行
				} else {
					html += "<span class='tasknode' style='color:red'>(" + cnt + ")</span>";
					$thisnode.html(html);
				}

				while (node.getParentNode() != null) {
					node = node.getParentNode();
					var html = $("#" + node.tId + "_span").html();
					if (html.toLowerCase().search("</span>") == -1) {
						$("#" + node.tId + "_span").html(
								html + "<span class='tasknode' style='color:red'>*</span>");
					}
				}

			});// #each
		}// #success
	});
}// #loadMsg
